﻿@{
    Layout = null;
}
<script src="~/Scripts/MGJJS/AntiFake/AntiFakeVerify.js"></script>

<style>
    .triangle-right {
        width: 0;
        height: 0;
        border-top: 5px solid transparent;
        border-left: 10px solid #000000;
        border-bottom: 5px solid transparent;
        display:inline-block;
    }
    .triangle-down {
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 10px solid #000000;
        display: inline-block;
    }
    #Particulars {
        box-shadow: 0px 0px 20px #888888;
    }
    #T_F {
        height: 150px;
        background: red;
        color: red;
        display: -webkit-flex; /* Safari */
        display: flex;
        justify-content: center;
        align-items: flex-end;
    }
    #T_F_Child {
        width: 60px;
        height: 60px;
        line-height: 60px;
        border-radius: 30px;
        background: #FFFFFF;
        text-align: center;
        font-size: 20px;
        margin-bottom: 20px;
        font-weight:600;
    }
    .The_P {
        text-indent: 2em;
    }
    .The_Box {
        letter-spacing:7px;
    }
    .fr{
        float:right
    }
    #QueryLogUl > li {
        display: -webkit-flex;
        display: flex;
        -webkit-justify-content: space-between;
        justify-content: space-between;
        width: 100%;
    }
    .myTabs.nav-tabs > li.active > a, .myTabs.nav-tabs > li.active > a:focus, .myTabs.nav-tabs > li.active > a:hover {
        color: #555;
        cursor: default;
        background-color: #fff;
        border: 1px solid #ddd;
        border-bottom-color: transparent;
    }
</style>
<div class="mtlr15" data-example-id="togglable-tabs">
    <form id="myTabContent" style="margin-top:20px;">
        <div role="tabpanel" id="SecurityCode" aria-labelledby="SecurityCode-tab">
            <div class="col-xs-5 col-sm-5 col-md-5 col-lg-5  col-md-offset-3">
                    <div class="input-group">
                        <input type="text" class="form-control" name="ActivationCode" placeholder="防伪验证" id="ActivationCode">
                        <span class="input-group-addon" id="SearchInfo">
                            <span class="glyphicon glyphicon-search"></span>
                        </span>
                    </div>
                <div style="margin-top:20px">
                    <div id="AntiFakeInfoCon" style="border: 2px solid #E4EAEC; border-radius: 5px; min-height: 200px;border-top:none;display:none">
                        <div id="T_F">
                            <div id="T_F_Child">错误</div>
                        </div>
                        <div style="position:relative;padding:20px 20px 30px;min-height:420px;">
                            <p class="The_P">您所查询的防伪码不存在，防伪码应是不含空格的纯数字编码，请核对，谨防假冒！</p>
                            <div id="Particulars" style="padding:20px;">
                                <div class="new-row">
                                   
                                    <span id="The_Code"></span>
                                </div>
                                <div class="new-row">
                                    <img id="QrCodeImg" style="margin:0 auto;width:70%" />
                                </div>
                                <div class="new-row">

                                    <span style="white-space: nowrap; " class="The_Box col-xs-4 col-sm-4 col-md-4 col-lg-4">企业名称:</span>
                                    <span style="word-break: break-all; " id="EnterpriseUse"></span>
                                </div>
                                <div class="new-row">
                                    <span style="white-space: nowrap; " class="The_Box col-xs-4 col-sm-4 col-md-4 col-lg-4">产品名称:</span>
                                    <span style="word-break: break-all; " id="BrandName" class="BrandNames"></span>
                                </div>
                              
                                <div class="new-row">
                                    <span style="white-space: nowrap; " class="col-xs-4 col-sm-4 col-md-4 col-lg-4">首次查询时间:</span>
                                    <span style="word-break: break-all; " id="FirstQueries"></span>
                                </div>
                            </div>
                            
                            <ul id="QueryLogUl"></ul>
                            <div style="position:absolute;bottom:10px;left:0;width:100%;">
                                <p style="margin:0;text-align:center;font-size:12px;color:#bbb;">技术支持：码管家云系统 版权所有</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>

<script>
    var ColspanNub = $(".table.table-hover.table-bordered").find("tr").children("td").length
    window.User_EmptyHtml = '<tr><td colspan="' + ColspanNub + '"><p class="no-result">无符合条件的数据结果</p></td></tr>';

    $('#myTabContent').bootstrapValidator({
        fields: {
            ActivationCode: {
                validators: {
                    notEmpty: {
                        message: '防伪码不能为空'
                    },
                    regexp: {
                        regexp: /^\d+$/,
                        message: '请输入数字'
                    },
                    stringLength: {
                        min: 18,
                        max: 24,
                        message: '防伪码长度必须在18到24位之间'
                    }
                }
            }
        }
    })
    $('#SearchInfo').click(function () {
        var bootstrapValidator = $("#myTabContent").data('bootstrapValidator').validate();
        if (bootstrapValidator.isValid()) {
            $.MGJ.AntiFakeVerify.Ajax_GetAntiFakeInfo($(this).prev().val());
        }
        else {
            $.L.msgError("请检查数据格式！");
        };
    })
</script>